Sébastien Wilmet [Wed, 20 Apr 2016 15:03:36 +0000 (17:03 +0200)]
app-accels: rename static functions
Remove the "accels_" prefix from the remaining static functions. The
prefix no longer makes sense since the whole file is devoted to accels.
https://bugzilla.gnome.org/show_bug.cgi?id=764879
Sébastien Wilmet [Mon, 11 Apr 2016 15:13:09 +0000 (17:13 +0200)]
app: extract GtkApplicationAccels private class
This has several benefits:
- Less code in GtkApplication. The accels handling is something
self-contained, and GtkApplication now delegates the work.
- For the accels functions, there is now a distinction between static
functions and functions in the gtkapplicationaccelsprivate.h header,
which makes the code easier to understand, because we have a good
overview just by reading the header.
- The struct _GtkApplicationPrivate is now easier to find instead of
being in the middle of the file.
https://bugzilla.gnome.org/show_bug.cgi?id=764879
Sébastien Wilmet [Mon, 11 Apr 2016 15:28:23 +0000 (17:28 +0200)]
app: write higher-level gtk_application_accels static functions
These will become the functions present in the
gtkapplicationaccelsprivate.h header.
The gtk_application_accels functions deal with detailed_action_name's
instead of action_and_target's. action_and_target is an implementation
detail of Accels.
The added function prototype is temporary, it'll be removed in a later
commit.
https://bugzilla.gnome.org/show_bug.cgi?id=764879
Paolo Borelli [Thu, 21 Apr 2016 20:54:55 +0000 (22:54 +0200)]
textiter: add unit test for forward_to_line_end
Surprisingly we had no unit test for this method
Matthias Clasen [Fri, 22 Apr 2016 03:24:13 +0000 (23:24 -0400)]
Fix formatting
The previous change was not quite using the right coding style.
Timm Bäder [Tue, 19 Apr 2016 15:12:00 +0000 (17:12 +0200)]
listbox: Make sure page down/up move at least one row
When the current cursor_row is taller than the page_size we get from the
GtkAdjustment, the previous code would not actually cause any scrolling,
so make sure we just take the row after or before the cursor_row in that
case.
https://bugzilla.gnome.org/show_bug.cgi?id=765261
Matthias Clasen [Fri, 22 Apr 2016 02:55:57 +0000 (22:55 -0400)]
Ad d new API to the docs
Frediano Ziglio [Thu, 21 Apr 2016 13:30:58 +0000 (14:30 +0100)]
Save scancode inside GdkEventPrivate
Windows save in hardware_keycode an information which is not so low
level and some application require the hardware scancode.
As Windows provides this information save it in GdkEventPrivate
and provide a function to get this information.
For no Windows system the function return the hardware_keycode instead.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=765259
Benjamin Otte [Thu, 21 Apr 2016 20:28:58 +0000 (22:28 +0200)]
cssshadowsvalue: Avoid allocating new value if not needed
Benjamin Otte [Thu, 21 Apr 2016 20:28:40 +0000 (22:28 +0200)]
cssbordervalue: Avoid allocating new value if not needed
Benjamin Otte [Thu, 21 Apr 2016 20:28:14 +0000 (22:28 +0200)]
cssbgsizevalue: Avoid allocating new value if not needed
Matthias Clasen [Thu, 21 Apr 2016 18:21:14 +0000 (14:21 -0400)]
Add a dnd test using a window as icon
This case is causing problems in firefox. Lets at least make
sure that it doesn't crash in GTK+.
Lapo Calamandrei [Thu, 21 Apr 2016 15:01:45 +0000 (17:01 +0200)]
Adwaita: backdrop active button color tweaks
Lapo Calamandrei [Thu, 21 Apr 2016 14:51:24 +0000 (16:51 +0200)]
Adwaita: cosmetics
Lapo Calamandrei [Thu, 21 Apr 2016 14:43:35 +0000 (16:43 +0200)]
Adwaita: solid bg for disabled pushed button
Lapo Calamandrei [Thu, 21 Apr 2016 14:25:05 +0000 (16:25 +0200)]
Adwaita: spinbutton fixes
reset background-color on backdrop disable buttons and entry node.
Jonathan Matthew [Wed, 9 Mar 2016 12:44:45 +0000 (22:44 +1000)]
gtkmenusectionbox: remove submenus when the parent item is removed
https://bugzilla.gnome.org/show_bug.cgi?id=749405
Matthias Clasen [Wed, 20 Apr 2016 03:32:26 +0000 (23:32 -0400)]
widget: Don't show widget resizes in the inspector
Avoiding this sort of visual debugging in the inspector
is the main reason we have per-display debug flags now.
Matthias Clasen [Wed, 20 Apr 2016 03:24:54 +0000 (23:24 -0400)]
css gadget: Fix baseline debug
We were not using the baseline that we're computing.
Matthias Clasen [Wed, 20 Apr 2016 03:23:59 +0000 (23:23 -0400)]
Use qdata for debug flags
This avoids some overhead.
Matthias Clasen [Wed, 20 Apr 2016 03:23:18 +0000 (23:23 -0400)]
css gadget: Don't get display flags twice
This got more expensive now that we store them per-display,
so don't get them twice in the same function.
Christian Hergert [Wed, 20 Apr 2016 02:35:52 +0000 (19:35 -0700)]
debug: remove open-coded debug checks in gtktextsegment
These runtime checks were being performed whether or not we were in a
debug build. Using GTK_DEBUG_CHECK() will compile out of production
builds, as it will result in something like:
if (G_UNLIKELY(0))
which the optimizer can prune.
https://bugzilla.gnome.org/show_bug.cgi?id=765284
Matthias Clasen [Wed, 20 Apr 2016 01:09:51 +0000 (21:09 -0400)]
text tag: Add a va marshaller to ::event
Matthias Clasen [Wed, 20 Apr 2016 01:00:57 +0000 (21:00 -0400)]
text buffer: Add va marshallers for signals
Matthias Clasen [Wed, 20 Apr 2016 01:00:20 +0000 (21:00 -0400)]
menushell: Add a va marshaller for ::insert
Lapo Calamandrei [Tue, 19 Apr 2016 21:00:54 +0000 (23:00 +0200)]
Adwaita: use an image for backdrop button background
which doesn't make the sliders flash during background transition.
Lapo Calamandrei [Tue, 19 Apr 2016 20:57:28 +0000 (22:57 +0200)]
Adwaita: link button style fix
ensure the label color doesn't get overridden, fixes link button
label being gray in backdrop.
Lapo Calamandrei [Tue, 19 Apr 2016 20:55:55 +0000 (22:55 +0200)]
Adwaita: scale with marks style fix
reset background-color on the slider.
Lapo Calamandrei [Tue, 19 Apr 2016 20:45:05 +0000 (22:45 +0200)]
Adwaita: fix switch styling
ensure the last button has rounded corners and adapt to button
mixin changes.
Lapo Calamandrei [Tue, 19 Apr 2016 20:08:31 +0000 (22:08 +0200)]
Adwaita: fix insensitive switch styling
misplaced backdrop disabled selector was overriding the disabled
one.
Matthias Clasen [Tue, 19 Apr 2016 20:11:10 +0000 (16:11 -0400)]
Add some va marshallers to frequent signals
This makes us take the fast path in signal emission.
Lapo Calamandrei [Tue, 19 Apr 2016 19:58:24 +0000 (21:58 +0200)]
Adwaita: stop using images for solid backgrounds...
...unless it's needed.
Matthias Clasen [Tue, 19 Apr 2016 19:27:08 +0000 (15:27 -0400)]
magnifier: Only connect to ::draw when needed
This making us take the slow path in ::draw handling, so we
want to avoid it if we can.
https://bugzilla.gnome.org/show_bug.cgi?id=765238
Lapo Calamandrei [Tue, 19 Apr 2016 19:24:37 +0000 (21:24 +0200)]
Adwaita: add shadows back...
...correctly inizializing a sass var.
Rui Matos [Tue, 19 Apr 2016 19:03:45 +0000 (21:03 +0200)]
wayland: Leave existing mods on map_virtual_modifiers
map_virtual_modifiers() is supposed to add the necessary virtual mods
but otherwise leave the mods that are passed in.
https://bugzilla.gnome.org/show_bug.cgi?id=765270
Matthias Clasen [Tue, 19 Apr 2016 16:43:03 +0000 (12:43 -0400)]
wayland: Some more debug spew
Print the modifiers and their mapping out as well. This
information is contained in the keymap, but this is a bit
easier to digest.
Matthias Clasen [Tue, 19 Apr 2016 16:23:51 +0000 (12:23 -0400)]
wayland: Add debug output for keymaps
Use GDK_DEBUG=input to see your keymap sent over and over again.
Efficiency!
Timm Bäder [Tue, 19 Apr 2016 13:20:14 +0000 (15:20 +0200)]
gtkcssimagebuiltin: Save/restore around cairo_clip
This was previously causing trouble in checkbuttons where the check node
didn't have an icon shadow set, e.g. in Raleigh.
Matthias Clasen [Tue, 19 Apr 2016 11:34:44 +0000 (07:34 -0400)]
Add a comment to explain numbers here
This explains the change in the previous commit.
Piotr Drąg [Sat, 16 Apr 2016 17:46:02 +0000 (19:46 +0200)]
cups: Fix duplicate string
https://bugzilla.gnome.org/show_bug.cgi?id=765122
Chun-wei Fan [Tue, 8 Sep 2015 06:14:46 +0000 (14:14 +0800)]
MSVC builds: Update how introspection builds are done
This first adds a common autotools module that can be included by
the Makefile.am's to generate the file lists and the g-ir-scanner/
g-ir-compiler command lines to build the introspection files.
The autotools files for gdk/ and gtk/ are then updated to generate
the full file lists needed to build the introspection files, with
the full command lines for g-ir-scanner and g-ir-compiler as NMake
Makefile modules that can be used to build the introspection files
for Visual Studio builds.
https://bugzilla.gnome.org/show_bug.cgi?id=765195
Lapo Calamandrei [Mon, 18 Apr 2016 23:18:34 +0000 (01:18 +0200)]
Adwaita: better shadow stacking mixin
Christian Hergert [Mon, 18 Apr 2016 21:16:20 +0000 (14:16 -0700)]
frame-clock: avoid g_signal_emit_by_name()
These were showing up higher in Sysprof profiles.
The simple fix is to avoid the emit_by_name() and let the interface emit
the signals directly. No function preconditions are provided since these
are internal API.
Lapo Calamandrei [Mon, 18 Apr 2016 22:11:09 +0000 (00:11 +0200)]
Adwaita: fix infobar text color in backdrop windows
see https://bugzilla.gnome.org/show_bug.cgi?id=765213
Matthias Clasen [Mon, 18 Apr 2016 19:04:37 +0000 (15:04 -0400)]
font button: Convert from pango to css properly
This utility function should probably find a home somewhere else.
For now, this makes the deprecation warning go away.
Benjamin Otte [Mon, 18 Apr 2016 18:25:11 +0000 (20:25 +0200)]
cssimage: Warn if gradients only have 1 color stop
GTK <= 3.20 allowed that but the CSS spec and borwsers do not.
We might want to just remove that feature, but for now, we just warn.
Benjamin Otte [Sun, 27 Mar 2016 23:50:32 +0000 (01:50 +0200)]
theme: linear-gradient() needs 2 color-stops
So make sure our _solid() function gives it two.
Benjamin Otte [Sun, 27 Mar 2016 17:41:19 +0000 (19:41 +0200)]
theme: Split out _solid() function
The function creates a solid color image. Currently this is done with
linear-gradient().
Benjamin Otte [Sun, 3 Apr 2016 01:39:46 +0000 (03:39 +0200)]
win32 theme: Fix functions to not have spaces
CSS doesn't allow that (although GTK's CSS parser did so far not
complain).
Matthias Clasen [Mon, 18 Apr 2016 18:38:53 +0000 (14:38 -0400)]
Expand css style font tests
Test more of the syntax of the font: shorthand.
Matthias Clasen [Mon, 18 Apr 2016 18:38:12 +0000 (14:38 -0400)]
Fix a typo
We don't want to parse a weight twice, but a weight and a stretch.
Matthias Clasen [Mon, 18 Apr 2016 18:17:55 +0000 (14:17 -0400)]
HighContrast: Fix font: usage
Matthias Clasen [Mon, 18 Apr 2016 18:09:41 +0000 (14:09 -0400)]
Add backwards compat back
Apparently, there's lots of font: "pango font description" out there,
so keep parsing this, with a deprecation warning.
Matthias Clasen [Mon, 18 Apr 2016 15:45:55 +0000 (11:45 -0400)]
Adwaita: Fix use of font: shorthand
Matthias Clasen [Mon, 18 Apr 2016 15:43:29 +0000 (11:43 -0400)]
Fix parsing of the font: shorthand
Our code here was just throwing it at PangoFontDescription.
Fix this by parsing the various components ourselves.
Matthias Clasen [Mon, 18 Apr 2016 15:43:01 +0000 (11:43 -0400)]
Export some font parsing functions
These will be used for parsing the font: shorthand too.
Matthias Clasen [Mon, 18 Apr 2016 15:40:10 +0000 (11:40 -0400)]
Fix the css style font test
Setting the font: shorthand to something like smaller is not
in line with the css spec. Just set the font-size: property
for this.
Also fix the other font: shorthand to specify size and family
according to the css spec.
Matthias Clasen [Mon, 18 Apr 2016 13:43:10 +0000 (09:43 -0400)]
css style: Rename some static functions
Make the font property functions follow the general naming
scheme, and remove pango from the names.
Matthias Clasen [Mon, 18 Apr 2016 13:42:40 +0000 (09:42 -0400)]
Add docs for new API
Carlos Garnacho [Mon, 18 Apr 2016 13:10:49 +0000 (14:10 +0100)]
wayland: Improve checks when flushing scroll events
If we get gdk_wayland_seat_flush_frame_event() with no previous event to be
flushed, we fallback into the scroll event checks. However, there's no check
performed there as to whether it really scrolled, so it'd always send a smooth
scroll event with 0/0 deltas in this case.
This should be mostly harmless, but still, we should only end up emitting scroll
events if those really happened.
Carlos Garnacho [Mon, 18 Apr 2016 12:10:24 +0000 (13:10 +0100)]
wayland: Do not check the pointer focus when receiving wl_pointer.frame
The frame event is also meant to compress wl_pointer.leave events, at this
point the focus surface will be definitely NULL. In the end, wl_pointer.frame
should flush the last composed event despite the pointer focus.
https://bugzilla.gnome.org/show_bug.cgi?id=765065
Carlos Garnacho [Sun, 17 Apr 2016 20:19:58 +0000 (21:19 +0100)]
gdk: Make GDK_TOUCH_CANCEL be dealt with similarly to GDK_TOUCH_END
We must emit the cancel event with the same semantics, and towards the GdkWindow
that is currently under the touchpoint, so make proxy_button_event() deal with
GDK_TOUCH_CANCEL.
Fixes the GDK_TOUCH_CANCEL event being emitted only on the toplevel, which is
usually non-sufficient.
Matthias Clasen [Fri, 1 Apr 2016 01:35:43 +0000 (21:35 -0400)]
widget: Use gdk_pango_get_for_display
Matthias Clasen [Fri, 1 Apr 2016 01:33:03 +0000 (21:33 -0400)]
Add gdk_pango_context_get_for_display
This is the obvious 1 line equivalent of the for_screen function.
Piotr Drąg [Mon, 18 Apr 2016 00:36:20 +0000 (02:36 +0200)]
Updated Polish translation
Lapo Calamandrei [Sun, 17 Apr 2016 21:40:29 +0000 (23:40 +0200)]
Adwaita: cosmetics
Lapo Calamandrei [Sun, 17 Apr 2016 21:08:26 +0000 (23:08 +0200)]
Adwaita: colorbutton colorswatch shadow fix
reset colorswatch box-shadow on active and checked state as well
following latest style changes.
Lapo Calamandrei [Sun, 17 Apr 2016 20:46:48 +0000 (22:46 +0200)]
Adwaita: increase opacity on scale label and marks
using the same opacity as dim-label.
Piotr Drąg [Sun, 17 Apr 2016 18:22:47 +0000 (20:22 +0200)]
Updated POTFILES.in and POTFILES.skip
Matthias Clasen [Sun, 17 Apr 2016 17:41:29 +0000 (13:41 -0400)]
bloatpad: Make shortcuts window update
This tests the just added functionality to make shortcuts
track changes in their actions accelerators.
Matthias Clasen [Sun, 17 Apr 2016 17:38:51 +0000 (13:38 -0400)]
shortcuts: Follow changes of accels
Add a way to associate a detailed action name with a shortcut.
If the action name is set, update the accelerator whenever
accels change on the window that the shortcuts window is
associated with.
https://bugzilla.gnome.org/show_bug.cgi?id=764975
Matthias Clasen [Sun, 17 Apr 2016 14:22:59 +0000 (10:22 -0400)]
Add a help overlay to bloatpad
This will let us explore the (non-)interaction between
help overlays and editing shortcuts.
Lapo Calamandrei [Sun, 17 Apr 2016 16:39:07 +0000 (18:39 +0200)]
Adwaita: clean up pushed button mixin
Lapo Calamandrei [Sun, 17 Apr 2016 16:19:38 +0000 (18:19 +0200)]
Adwaita: fix scale slider border color
using the darker border color.
Lapo Calamandrei [Sun, 17 Apr 2016 16:17:07 +0000 (18:17 +0200)]
Adwaita: flatten colorswatches
Lapo Calamandrei [Sun, 17 Apr 2016 16:06:15 +0000 (18:06 +0200)]
Adwaita: more borders color tweaks
Lapo Calamandrei [Sun, 17 Apr 2016 13:26:22 +0000 (15:26 +0200)]
Adwaita: cosmetics
Lapo Calamandrei [Sun, 17 Apr 2016 13:24:57 +0000 (15:24 +0200)]
Adwaita: dark variant borders color tweaks
Lapo Calamandrei [Sun, 17 Apr 2016 13:21:31 +0000 (15:21 +0200)]
Adwaita: pushed button style tweak
use a solid background.
Lapo Calamandrei [Sun, 17 Apr 2016 13:06:13 +0000 (15:06 +0200)]
Adwaita: button style tweak
add a darker bottom border to buttons to add some depth.
Matthias Clasen [Sun, 17 Apr 2016 05:54:43 +0000 (01:54 -0400)]
Add some more accelerator / modifier tests
Matthias Clasen [Sun, 17 Apr 2016 05:50:23 +0000 (01:50 -0400)]
wayland: Make virtual modifier mapping more similar to X
Ignore virtual modifiers that are mapped to Mod1 (as Meta
often is), to avoid interfering with our fix interpretation
of Mod1 as Alt.
Matthias Clasen [Sun, 17 Apr 2016 05:09:32 +0000 (01:09 -0400)]
menuitem: Fix some possible problems with arrow_gadget
https://bugzilla.gnome.org/show_bug.cgi?id=765134 shows
a stacktrace where we end up with arrow_gadget being NULL
despite the conditions for its presence being satisfied.
This commit makes sure we call update_arrow_gadget() whenever
any of the conditions changes. This should fix the reported
crash.
Matthias Clasen [Sun, 17 Apr 2016 03:16:12 +0000 (23:16 -0400)]
wayland: Fix the map_virtual_modifiers implementation
We were not stripping real modifiers out, and thus always
thought there's a conflict when the passed in modifiers
included any real modifiers.
Bastien Nocera [Fri, 15 Apr 2016 10:13:34 +0000 (12:13 +0200)]
cups: Fix gettext usage
The previous patches didn't mark some strings as to be translated, and
tried to translate strings with a variable part already inside the
string, which isn't going to work.
Mark the strings as translatable with context, and also make sure to
translate static strings when getting them out of their structure.
https://bugzilla.gnome.org/show_bug.cgi?id=764585
Lapo Calamandrei [Sat, 16 Apr 2016 12:42:13 +0000 (14:42 +0200)]
Adwaita: ensure dialogs titlebar rounded corners
broken from my previous commit about rounded corners, dialogs
doesn't use the "window" node, but the "dialog" node, so use the
.background styleclass in the selectors which is more generic.
Lapo Calamandrei [Sat, 16 Apr 2016 12:32:04 +0000 (14:32 +0200)]
Adwaita: more border color tweaking
Lapo Calamandrei [Sat, 16 Apr 2016 12:28:29 +0000 (14:28 +0200)]
Adwaita: lighten border color a bit
Lapo Calamandrei [Sat, 16 Apr 2016 11:41:32 +0000 (13:41 +0200)]
Adwaita: flatten the switch base
Lapo Calamandrei [Sat, 16 Apr 2016 11:35:48 +0000 (13:35 +0200)]
Adwaita: flatten entries and similar widgets
Lapo Calamandrei [Sat, 16 Apr 2016 11:21:39 +0000 (13:21 +0200)]
Adwaita: delete unused mixin
Lapo Calamandrei [Sat, 16 Apr 2016 11:19:41 +0000 (13:19 +0200)]
Adwaita: flatten scale and progressbar trough
Lapo Calamandrei [Sat, 16 Apr 2016 09:58:14 +0000 (11:58 +0200)]
Adwaita: ensure titlebar corners are not rounded...
...when the window is maximized or tiled, by using more specific
selectors, since there were cases of erroneusly rounded corners.
See https://bugzilla.gnome.org/show_bug.cgi?id=765038
Matthias Clasen [Sat, 16 Apr 2016 02:20:25 +0000 (22:20 -0400)]
wayland: Implement virtual modifiers
Since Wayland is using libxkbcommon, it inherits X unfortunate
real/virtual modifier distinction, so we have to do the same
gymnastics we do for X to map between the two.
This should fix matching of accelerators using virtual modifiers
(modulo gnome-shell bugs regarding the handling of Super).
https://bugzilla.gnome.org/show_bug.cgi?id=764424
Matthias Clasen [Sat, 16 Apr 2016 02:13:30 +0000 (22:13 -0400)]
Clarify docs a bit
The wording here was just awkward: TRUE is returned if... Note that
FALSE is also returned if...
Руслан Ижбулатов [Fri, 15 Apr 2016 17:37:49 +0000 (17:37 +0000)]
gtk-builder-tool: use g_printf() instead of g_print()
1) g_print() can be redirected
2) g_print() does some extra processing, such as character set conversion.
Specifically, on W32 it will detect system codepage via GetACP(),
and will convert UTF-8 output into that codepage, even though
the output should stay unchanged (whether gtk-builder-tool interprets
strings from ui files as UTF-8 is a separate matter).
https://bugzilla.gnome.org/show_bug.cgi?id=765118
Lapo Calamandrei [Fri, 15 Apr 2016 16:28:26 +0000 (18:28 +0200)]
Adwaita: really fix solid-csd
add a specificity bump hack in the titlebar solid-csd styling to
avoid being overridden by the split titlebar theme logic.
Lapo Calamandrei [Fri, 15 Apr 2016 16:00:37 +0000 (18:00 +0200)]
Adwaita: fix backdrop solid-csd
titlebar rounded corners were not overridden for backdrop state.
Lapo Calamandrei [Fri, 15 Apr 2016 14:51:29 +0000 (16:51 +0200)]
Adwaita: better solid-csd styling
Jeremy Tan [Fri, 15 Apr 2016 11:22:20 +0000 (19:22 +0800)]
GDK W32: Fix positioning of reparented window
MoveWindow should not be used over the pre-existing move/resize
functions, which already correctly position a window with respect
to its parent, while also taking into account the size of window
decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=765100